package cn.walls1717.wallsmall.auth.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import cn.walls1717.wallsmall.auth.vo.SocialUserVO;
import cn.walls1717.wallsmall.auth.vo.UserLoginVO;
import cn.walls1717.wallsmall.auth.vo.UserRegisterVO;
import cn.walls1717.wallsmall.common.utils.R;

/**
 * 用户服务Feign
 *
 * @author walls1717
 * @since 2022/11/12 13:15
 **/
@FeignClient("wallsmall-member")
public interface MemberFeignService {

    /**
     * 用户注册
     *
     * @param registerVO 注册数据
     * @return 结果
     */
    @PostMapping("/member/member/register")
    R register(@RequestBody UserRegisterVO registerVO);

    /**
     * 用户登录
     *
     * @param loginVO 登录参数
     * @return 结果
     */
    @PostMapping("/member/member/login")
    R login(@RequestBody UserLoginVO loginVO);

    /**
     * 第三方登录
     *
     * @param loginVO 登录参数
     * @return 结果
     */
    @PostMapping("/member/member/oauth2/login")
    R socialLogin(@RequestBody SocialUserVO loginVO);

}
